package com.qf.function.service;

import com.qf.pojo.User;

import java.util.function.Function;

public class FunctionTest {
    public static void main(String[] args) {
//        Function< String , User> function =  new Function<String, User>() {
//            @Override
//            public User apply(String s) {
//                return null;
//            }
//        };
        Function<String,User> function=(name)->{
            User user = new User();
            user.setName(name);
            return user;
        };
        User user = function.apply("aaaa");

        System.out.println(user);
    }
}
